package com.ruoyi.dataAnalysisMapper.domain;

import com.ruoyi.planthopper.domain.InvesInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: class by cxf
 * @author: AbrahamBill
 * @date: 2022/11/30
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RetInfo {
    private String date;
    private int sum;
    private int M_BPH_adult;
    private int B_BPH_adult;
    private int S_BPH_nymph;
    private int M_WBPH_adult;
    private int B_WBPH_adult;
    private int S_WBPH_nymph;
    private int J_RPH_nymph;
    private int M_SBPH_adult;
    private int B_SBPH_adult;
    private int S_SBPH_nymph;
    private int Spider;
    private int Miridae;
    private int Rove_beetle;
    private int RLH_adult;
    private int RLH_nymph;
    public void initArgs(){
        this.date = "total";
        this.sum=0;
        this.M_BPH_adult=0;
        this.B_BPH_adult=0;
        this.S_BPH_nymph=0;
        this.M_WBPH_adult=0;
        this.B_WBPH_adult=0;
        this.S_WBPH_nymph=0;
        this.J_RPH_nymph=0;
        this.M_SBPH_adult=0;
        this.B_SBPH_adult=0;
        this.S_SBPH_nymph=0;
        this.Spider=0;
        this.Miridae=0;
        this.Rove_beetle=0;
        this.RLH_adult=0;
        this.RLH_nymph=0;
    }
    public void SameDayAdd(InvesInfo invesInfo){
        this.setSum(this.sum+invesInfo.getSum());
        this.setM_BPH_adult(this.M_BPH_adult+invesInfo.getMBphAdult());
        this.setB_BPH_adult(this.B_BPH_adult+invesInfo.getBBphAdult());
        this.setS_BPH_nymph(this.S_BPH_nymph+invesInfo.getSBphNymph());
        this.setM_WBPH_adult(this.M_WBPH_adult+invesInfo.getMWbphAdult());
        this.setB_WBPH_adult(this.B_WBPH_adult+invesInfo.getBWbphAdult());
        this.setS_WBPH_nymph(this.S_WBPH_nymph+invesInfo.getSWbphNymph());
        this.setJ_RPH_nymph(this.J_RPH_nymph+invesInfo.getJRphNymph());
        this.setM_SBPH_adult(this.M_SBPH_adult+invesInfo.getMSbphAdult());
        this.setB_SBPH_adult(this.B_SBPH_adult+invesInfo.getBSbphAdult());
        this.setS_SBPH_nymph(this.S_SBPH_nymph+invesInfo.getSSbphNymph());
        this.setSpider(this.Spider+invesInfo.getSpider());
        this.setMiridae(this.Miridae+invesInfo.getMiridae());
        this.setRove_beetle(this.Rove_beetle+invesInfo.getRoveBeetle());
        this.setRLH_adult(this.RLH_adult+invesInfo.getRlhAdult());
        this.setRLH_nymph(this.RLH_nymph+invesInfo.getRlhNymph());
    }
}
